<?php
/*
+--------------------------------------------------------------------------
|   Web: http://www.enbac.com 
|   Started date : 30/06/2008
+---------------------------------------------------------------------------
|   > Script written by Nova
+---------------------------------------------------------------------------
*/
class ajax_misc {


    	function playme()
    	{
    		$code = AZLib::getParam('code');
			switch( $code )
			{
				case 'flash_view':
					$this->flash_view();
					break;		
				default:
					$this->home();
					break;
			}
			
		}





function home()
{
	die("no_info");
}

function flash_view()
{
$item_id  = AZLib::getParam('item_id');
	
if(!$item_id){
	die("no_info");	
}


$html = <<<EOF
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Flash view mode - Enbac.com</title>
<script type="text/javascript" src="javascript/swfobject.js"></script>
<script>
function close_block() { 
  window.parent.jQuery.unblockUI();
}	
</script>
 
<style type="text/css">	
	/* hide from ie on mac \*/
	* {
		background-color: #000000;
		margin:0px;
		padding:0px;
	}
	
	html {
		height: 100%;
		overflow: hidden;
		text-align:center;
		margin:0px;
		padding:0px;
		background-color: #000000;
	}
	div {
		background-color: #000000;
		margin:0px;
		padding:0px;
		color:#fff;
	}
	
	#flashcontent {
		height: 100%;
		margin:0px;
		padding:0px;		
	}
	/* end hide */
	
	body {
		height: 100%;
		margin:0px;
		padding:0px;
		background-color: #000000;
		color:#ffffff;
		font-family:sans-serif;
		font-size:60;
		text-align:center;

	}

	.close{
		font-size:22px;
		text-align:right;
		cursor: pointer;		
	}
	#vwraper{
		text-align:center;	
		height: 100%;	
	} 
	a {	
		color:#cccccc;
	}
</style>
</head>
<body>
	<div id="vwraper">
	<div class="close" onclick="close_block();">[X] Đóng lại</div>
	<div id="flashcontent">TiltViewer requires the latest Flash player. <a href="http://www.macromedia.com/go/getflashplayer/">Get Flash here.</a> If you have Flash installed, <a href="index.html?detectflash=false">click to view</a>.</div>
	<script type="text/javascript">
		var fo = new SWFObject("includes/extra/TiltViewer.swf", "viewer", "100%", "100%", "9", "#000000");			
		
		// TILTVIEWER-PRO CONFIGURATION OPTIONS
		// To use these options, uncomment them by removing the '//' at the start of the line
		// For a description of config options, go to: 
		// http://www.airtightinteractive.com/projects/tiltviewer/pro/config_options.html
		//
		
		fo.addVariable('useFlickr', 'false');
		fo.addVariable('xmlURL', 'ebxml.php%3Fact%3Ditem%26code%3Dtiltviewer_gallery%26item_id%3D{$item_id}');
		fo.addVariable('maxJPGSize','740');
		fo.addVariable('columns', '5');
		fo.addVariable('rows', '3');
		fo.addVariable('linkLabel', "Xem chi tiết");
		fo.addVariable('backColor', "0xDDDDDD");
		fo.addVariable('frameWidth', "-5");
		fo.addVariable('showLinkButton', "false");
		
		//fo.addVariable('showLinkButton', 'true');
		fo.addVariable('zoomedInDistance', '1000');
		fo.addVariable('zoomedOutDistance', '4000');
		//fo.addVariable('fontName', 'Times');
		//fo.addVariable('titleFontSize', '50');
		//fo.addVariable('descriptionFontSize', '20');
		//fo.addVariable('linkFontSize', '40');	
		//fo.addVariable('textColor', '0xff0000');
		//fo.addVariable('linkTextColor', '0x00ff00');
		//fo.addVariable('linkBkgndColor', '0x0000ff');		
		//fo.addVariable('frameColor', '0xff0000');
		//fo.addVariable('bkgndInnerColor', '0xff00ff');
		//fo.addVariable('bkgndOuterColor', '0x0000ff');		
		//
		// END TILTVIEWER-PRO CONFIGURATION OPTIONS
		
		fo.addParam("allowFullScreen","true");
		fo.addParam("enableSounds","false");
	    fo.addParam('allowscriptaccess','always');
	    fo.addParam('allowfullscreen','true');
		fo.write("flashcontent");	
	</script>
	</div>
</body>
</html>
EOF;
echo $html;
exit;
}
}
?>